package com.sihan.swvp.dao.sys;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.sihan.swvp.dao.BaseDao;
import com.sihan.swvp.entity.sys.Enterprise;
import com.sihan.swvp.entity.sys.User;

public interface EnterpriseDao extends BaseDao{

	public List<Map<String, Object>> getEnterprise(@Param("node")String node,@Param("eid")long eid,@Param("userid")long userid);

	public int addEnterprise(Enterprise enterprise);

	public int upateEnterprise(Enterprise enterprise);

	public void deleteEnterprise(@Param("id")Integer id,@Param("upuser") long user);
	
	public int isCompany(@Param("eid")String eid,@Param("name")String name);
	
	
	public Enterprise getEnterpriseById(@Param("eid")long eid);

	public int validDept(@Param("eid") String eid,@Param("id") String id,@Param("name") String name);
	
	public List<Enterprise> getEnterpriseByPid(@Param("pid")Integer pid);

	public List<Map<String, Object>> getPrivEnterPrise(User user);
	
	/**
	 * 根据名称验证部门
	 * @param param
	 * @return
	 */
	public int getNameValidate(Map<String, Object> param);
	
}
